package com.topvision.service.impl.zwan;

import com.topvision.annotation.DataSource;
import com.topvision.db.DataSourceConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.topvision.mapper.zwan.CompanydeviceMapper;
import com.topvision.model.zwan.Companydevice;
import com.topvision.service.zwan.CompanydeviceService;

@Service("companydeviceService")
public class CompanydeviceServiceImpl implements CompanydeviceService {
	@Autowired
	private CompanydeviceMapper companydeviceMapper;
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public Companydevice queryObject(String deviceid){
		return companydeviceMapper.queryObject(deviceid);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public List<Companydevice> queryList(Map<String, Object> map){
		return companydeviceMapper.queryList(map);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public int queryTotal(Map<String, Object> map){
		return companydeviceMapper.queryTotal(map);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void save(Companydevice companydevice){
		companydeviceMapper.save(companydevice);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void update(Companydevice companydevice){
		companydeviceMapper.update(companydevice);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void delete(String deviceid){
		companydeviceMapper.delete(deviceid);
	}
	
	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void deleteBatch(String[] deviceids){
		companydeviceMapper.deleteBatch(deviceids);
	}

	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public List<Map<String, Object>> queryBindList(Map<String, Object> map) {
		return companydeviceMapper.queryBindList(map);
	}

	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public void deleteCompanyDevice(Map<String, Object> params) {
		companydeviceMapper.deleteCompanyDevice(params);
	}

	@Override
	@DataSource(DataSourceConstants.ORACLE_PORTAL_SLAVE)
	public Map<String, Object> queryWithCompany(Map<String, Object> params) {
		return companydeviceMapper.queryWithCompany(params);
	}

}
